from .client import CommonClient
from .client import ApiClient
from ..utils.url_params import OpenApiUrlParams

"""
UserClient
个人用户帐号管理
"""


class UserClient(ApiClient):
    # 添加个人用户
    def add(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_ADD, data)

    # 更新个人用户
    def update(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_UPDATE, data)

    # 删除个人用户
    def delete(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_DELETE, data)

    # 禁用个人用户
    def disable(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_DISABLE, data)

    # 恢复个人用户
    def enable(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_ENABLE, data)

    # 解绑个人用户账号
    def unbind(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_UNBIND, data)

    # 获取个人用户授权链接
    def get_auth_url(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_GET_AUTH_URL, data)

    # 查询个人用户基本信息
    def get_detail(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_GET_DETAIL, data)

    # 获取个人用户身份信息
    def get_identity_info(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.USER_GET_IDENTITY_INFO, data)




